1. Field of the Invention
This invention relates in general to database management systems performed by computers, and in particular, to query simplification and optimization involving GROUP BY operations.
2. Description of Related Art
Computer systems incorporating Relational DataBase Management System (RDBMS) software using a Structured Query Language (SQL) interface are well known in the art. The SQL interface has evolved into a standard language for RDBMS software and has been adopted as such by both the American Nationals Standard Institute (ANSI) and the International Standards Organization (ISO).
For most RDBMS software, queries involving GROUP BY operations are very common, and hence optimizing such queries becomes increasingly important. There are extensive research activities and literature on such optimizations, as disclosed in the following publications, which are incorporated by reference herein:
1. W. Yan and P. Larson. Performing Group-By Before Join. Proceedings of the 10th Int""l. Conference on Data Engineering, 1994.
2. D. Simmen, E. Shekita and T. Malkemus. Fundamental Techniques for Order Optimization. Proceedings ACM SIGMOD International Conference on Management of Data, June 1996.
Yan and Larson""s work focused on re-ordering a group by operation with joins. For example, it may be more efficient to perform the group by operation before any joins. Simmen, Shekita and Malkemus"" work focused on minimizing the sort requirements for complex SQL including group by operations.
Nonetheless, there is a need in the art for more sophisticated techniques for query simplification and optimization involving GROUP BY operations.
To overcome the limitations in the prior art described above, and to overcome other limitations that will become apparent upon reading and understanding the present specification, the present invention discloses a method, apparatus, and article of manufacture for simplifying and optimizing queries involving GROUP BY operations, when GROUP BY items involve constants and when there are xe2x80x9cfalsexe2x80x9d predicates in SELECT-HAVING clauses.